package com.ast;

import com.ir.*;

import java.util.List;

public class FuncDefNode {
    FuncTypeNode type;
    String name;
    FuncFParamsNode funcFParams;
    BlockNode block;
    Func func;

    public FuncDefNode(String s,String name) {
        this.type = new FuncTypeNode(s);
        this.name = name;
    }
    public FuncDefNode(FuncTypeNode type, String name, FuncFParamsNode funcFParams, BlockNode block) {
        this.type = type;
        this.name = name;
        this.funcFParams = funcFParams;
        this.block = block;
    }

    public FuncTypeNode getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public FuncFParamsNode getFuncFParams() {
        return funcFParams;
    }

    public BlockNode getBlock() {
        return block;
    }

    public void setIR(Func func) {
        this.func = func;
    }

    public Func getFunc() {
        return func;
    }
}
